package com.woniuxy.dudugua.controller;

import com.woniuxy.dudugua.entity.Product;
import com.woniuxy.dudugua.service.ProductAllService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.woniuxy.dudugua.util.Result;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;

/**
 * @author JadeFang
 * @Deprecated 管理员后台管理系统之商品管理
 */
@RestController
public class ProductAllController {
    @Resource
    private ProductAllService  productAllService;
    //查询所有商品
    @RequestMapping("adminProductAll")
    public Result  selectByAdminProductAll()throws Exception{
        return  new Result("200","success",null,productAllService.selectByAdminProductAll());
    }

    //修改订单状态
    @RequestMapping("updateAdminProductStatus")
    public  Result updateByAdminProductStatus(int id, HttpServletRequest request) throws  Exception{
        return  new Result("200","success",productAllService.updateByAdminProductStatus(id),null);
    }
}
